package io.lckgroup.modules.lck.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.lckgroup.common.utils.PageUtils;
import io.lckgroup.common.utils.Query;
import io.lckgroup.modules.lck.dao.CommonAdDao;
import io.lckgroup.modules.lck.entity.CommonAdEntity;
import io.lckgroup.modules.lck.service.CommonAdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("commonAdService")
public class CommonAdServiceImpl extends ServiceImpl<CommonAdDao, CommonAdEntity> implements CommonAdService {
    @Autowired
    private CommonAdDao commonAdDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CommonAdEntity> page = this.page(
                new Query<CommonAdEntity>().getPage(params),
                new QueryWrapper<CommonAdEntity>()
        );

        return new PageUtils(page);
    }


}